home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
toolkit
/
riruf1
/
sendmail.frm
< prev
Wrap
Text File
|
1995-05-19
|
4KB
|
141 lines
VERSION 2.00
Begin Form SendMail
BackColor = &H00C0C0C0&
BorderStyle = 1 'Fixed Single
Caption = "Send Mail"
ClientHeight = 1695
ClientLeft = 1890
ClientTop = 2145
ClientWidth = 5835
Height = 2100
KeyPreview = -1 'True
Left = 1830
LinkTopic = "Form2"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1695
ScaleWidth = 5835
Top = 1800
Width = 5955
Begin TextBox txtMsg
Height = 285
Left = 1200
TabIndex = 2
Top = 840
Width = 4575
End
Begin TextBox txtSubject
Height = 285
Left = 1200
TabIndex = 1
Top = 480
Width = 4575
End
Begin TextBox txtAddress
Height = 285
Left = 1200
TabIndex = 0
Top = 120
Width = 2775
End
Begin CommandButton cmdSend
Caption = "&Send"
Default = -1 'True
Height = 375
Left = 1680
TabIndex = 4
Top = 1200
Width = 975
End
Begin MapiMessages MapiMessages
AddressCaption = ""
AddressEditFieldCount= 0
AddressLabel = ""
AddressModifiable= 0 'False
AddressResolveUI= 0 'False
FetchMsgType = ""
FetchSorted = 0 'False
FetchUnreadOnly = 0 'False
Left = 600
Top = 1200
End
Begin MapiSession MapiSession
Action = 0 'Nothing
DownloadMail = -1 'True
Left = 120
LogonUI = -1 'True
NewSession = 0 'False
Password = ""
Top = 1200
UserName = ""
End
Begin CommandButton cmdClose
BackColor = &H00C0C0C0&
Cancel = -1 'True
Caption = "&Close"
Height = 375
Left = 3360
TabIndex = 3
Top = 1200
Width = 975
End
Begin Label Label3
BackColor = &H00C0C0C0&
Caption = "Message:"
Height = 255
Left = 120
TabIndex = 7
Top = 840
Width = 975
End
Begin Label Label2
BackColor = &H00C0C0C0&
Caption = "Subject:"
Height = 255
Left = 120
TabIndex = 6
Top = 480
Width = 855
End
Begin Label Label1
BackColor = &H00C0C0C0&
Caption = "Address:"
Height = 255
Left = 120
TabIndex = 5
Top = 120
Width = 855
End
End
Option Explicit
Sub cmdClose_Click ()
Unload sendmail
End Sub
Sub cmdSend_Click ()
Dim sSubject$, sAddress$, sMsg$
sSubject = RTrim$(txtSubject.Text)
sAddress = RTrim$(txtAddress.Text)
sMsg = RTrim$(txtMsg.Text)
If Len(sAddress) < 1 Then
StopUser "The address field is blank!"
Exit Sub
End If
SendSingleMailMsg sendmail, sSubject, sMsg, sAddress
DoEvents
txtSubject.Text = ""
txtAddress.Text = ""
txtMsg.Text = ""
End Sub
Sub Form_KeyDown (KeyCode As Integer, Shift As Integer)
If KeyCode = KEY_F1 Then
CallHelp Send_Mail_Form
End If
End Sub